import types from './mutation-types'

export default {
    [types.SET_USERINFO](state, userinfo) {
        state.user_info = userinfo
    },
    [types.SET_VALUE](state, data) {
        state.couple.name = data.name;
        state.couple.id = data.id;
        state.couple.parent = data.parent;
	},
	[types.SET_ISSERVER](state,val){
		state.isServer=val;
	},
	[types.SET_LOCATION](state,val){
		state.location=val;
	},
	[types.CHANGE_NAV](state){
		state.showNavSec = !state.showNavSec;
		localStorage.setItem('showNavSec',state.showNavSec);
	},
	[types.SET_MENUS](state,val){
		state.menus = val;
	},
	[types.SET_THREEMENUSMAP](state,val){
		state.threeMenusMap = val;
	},
	[types.SET_REFRESH](state,val){
		state.refresh = false;
		setTimeout(()=>{
			state.refresh = true;
		},200)
	},
    setPageCenterTitle: (state, title) => {
		state.pageCenterTitle = title;
	},
    setMenuCurrent: (state, value) => {
		state.menuCurrent = value;
	}
}